package net.xdclass.util;

import org.apache.shardingsphere.core.strategy.keygen.SnowflakeShardingKeyGenerator;

public class IDUtil {
    private static SnowflakeShardingKeyGenerator snowflakeShardingKeyGenerator = new SnowflakeShardingKeyGenerator();

    /**
     * 生成雪花算法ID
     * @return
     */
    public static Comparable<?> geneSnowFlakeID(){
        return snowflakeShardingKeyGenerator.generateKey();
    }
}
